package chatgptBussiness;

import com.alibaba.fastjson.JSONObject;
import impl.TestServerBusinessImpl;
import models.GetRequestInputStream;
import models.MyConfig;
import models.ReturnJson;

import javax.servlet.http.HttpServletRequest;
import java.util.Objects;

/**
 * Created by yangxianming on 2017/9/30.
 *  向 chatgpt提问，主要是调python3的脚本
 */
public class Prompt implements TestServerBusinessImpl {

    @Override
    public String doIt(HttpServletRequest request, MyConfig myConfig){
        //读取请求json
        JSONObject requestInfo = GetRequestInputStream.getJson(request);
        ReturnJson returnJson = new ReturnJson();

        //数据库操作
        System.out.println(requestInfo);
        String action = requestInfo.getString("action");

        //新建条目
        if (Objects.equals("newProgress", action)){


        }


        return returnJson.toString();
    }


}
